package com.emep.emeptime.entity;

import com.emep.emeptime.model.SysAqiInfoComparator;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author Wangcc
 * @version V1.0
 * @Description: AQI标准信息表
 * @date 2018/2/27 16:32
 */
@Data
@Table(name = "sys_aqi_info")
@Entity
public class SysAqiInfo implements Serializable, Comparable<SysAqiInfo> {


    private static final long serialVersionUID = -4415880253641972999L;

    @Id
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @GeneratedValue(generator = "system-uuid")
    private String id;
    @Column(name = "aqi",columnDefinition="varchar(100) COMMENT 'aqi'" )
    private String aqi;
    @Column(name = "so2_24",columnDefinition="varchar(100) COMMENT '24小时二氧化硫'" )
    private  String so2_24;
    @Column(name = "so2",columnDefinition="varchar(100) COMMENT '二氧化硫'" )
    private  String so2;
    @Column(name = "no2_24",columnDefinition="varchar(100) COMMENT '24小时二氧化氮'" )
    private  String no2_24;
    @Column(name = "no2",columnDefinition="varchar(100) COMMENT '二氧化氮'" )
    private  String no2;
    @Column(name = "pm10_24",columnDefinition="varchar(100) COMMENT '24小时pm10'" )
    private  String pm10_24;
    @Column(name = "co_24",columnDefinition="varchar(100) COMMENT '24小时一氧化碳'" )
    private  String co_24;
    @Column(name = "co",columnDefinition="varchar(100) COMMENT '一氧化碳'" )
    private  String co;
    @Column(name = "o3",columnDefinition="varchar(100) COMMENT '臭氧'" )
    private  String o3;
    @Column(name = "o3_8",columnDefinition="varchar(100) COMMENT '8小时臭氧'" )
    private  String o3_8;
    @Column(name = "pm25_24",columnDefinition="varchar(100) COMMENT '24小时pm2.5'" )
    private  String pm25_24;
    @Column(name = "create_date",columnDefinition="varchar(100) COMMENT '录入时间'" )
    private String createDate = String.valueOf(System.currentTimeMillis());
    @Column(name = "is_delete",columnDefinition="varchar(100) COMMENT '是否删除'" )
    private String isDelete = "0";

    @Override
    public int compareTo(SysAqiInfo o) {
        return new SysAqiInfoComparator().compare(this,o);
    }
}